package com.buymobile.service.impl;

import java.util.Date;
import java.util.Map;

import com.buymobile.components.page.Page;
import com.buymobile.dao.GoodsDAO;
import com.buymobile.domain.Goods;
import com.buymobile.service.GoodsService;

public class GoodsServiceImpl implements GoodsService {

	private GoodsDAO goodsDAO;
	
	@Override
	public Page searchGoodsByCriteria(Map<String, Object> criteria,
			int pageIndex, int pageSize) {
		return goodsDAO.queryForPage("goods.queryGoods", criteria, pageIndex, pageSize);
	}
	
	@Override
	public void addGoods(Goods goods) {
//		goods.setInsertTime(new Date());
//		goodsDAO.save(goods);
		
	}

	public void setGoodsDAO(GoodsDAO goodsDAO) {
		this.goodsDAO = goodsDAO;
	}

}
